local skel = fk.CreateSkill {
  name = "emo__zhuanyun",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__zhuanyun"] = "转运",
  [":emo__zhuanyun"] = "锁定技，游戏开始时，你选择一个花色，记录为“转运”花色。",

  ["@emo__zhuanyun"] = "转运",
  ["#emo__zhuanyun-choice"] = "转运：请选择一种花色作为你的“转运”花色，你的此花色牌视为无色",

  ["$emo__zhuanyun1"] = "兔、兔子先生，您好。今天，也能带雏桃去找兔子洞吗？",
  ["$emo__zhuanyun2"] = "兔子先生，要和雏桃一起去参加疯帽子先生的茶会吗？",
}

skel:addEffect(fk.GameStart, {
  anim_type = "defensive",
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(skel.name)
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local choices = {"log_spade", "log_heart", "log_club", "log_diamond"}
    local choice = room:askToChoice(player, {
      choices = choices, skill_name = skel.name, prompt = "#emo__zhuanyun-choice"
    })
    room:setPlayerMark(player, "@emo__zhuanyun", {choice})
    player:filterHandcards()
  end,
})

--[[
skel:addEffect("maxcards", {
  exclude_from = function (self, player, card)
    local cid = card:getEffectiveId()
    if not cid then return false end
    local c = Fk:getCardById(cid, true)
    return table.contains(player:getTableMark("@emo__zhuanyun"), c:getSuitString(true))
  end,
})

skel:addEffect("filter", {
  mute = true, -- 太吵！
  card_filter = function (self, card, player, isJudgeEvent)
    return table.contains(player:getTableMark("@emo__zhuanyun"), card:getSuitString(true))
    and table.contains(player:getCardIds("h"), card.id)
  end,
  view_as = function (self, player, card)
    local c = Fk:cloneCard(card.name, Card.NoSuit, card.number)
    c.skillName = skel.name
    return c
  end,
})
--]]

return skel
